function msg-factory:
    &(sys::Locale) => &(Number) => String
    &(locale) => &(n) =>
        let {language} := locale,
        if (language = 'zh_TW'):
            { "收到 ? 筆資料" { String n } },
        elif (language = 'zh_CN'):
            { "收到 ? 条数据" { String n } },
        else:
            if (n = 1):
                'one item received',
            else:
                { "? items received" { String n } };

entry
    let make-msg := { msg-factory sys::Locale },
    { sys::println {
        "message 0: ?"..\n..  "message 1: ?"..\n..  "message 2: ?"
        ({make-msg 0}, {make-msg 1}, {make-msg 2})
    } }
    . { crash-on-error };


